﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Carozos.BC;
using Carozos.BE;

namespace Carozos.Web
{
    public partial class frmBuscaInsumo : System.Web.UI.Page
    {
        InsumoBC inBC = new InsumoBC();

        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void gv_SelectedIndexChanged(object sender, EventArgs e)
        {
            GridViewRow r = gv.SelectedRow;
            InsumoBE inBE = new InsumoBE(Int32.Parse(gv.SelectedValue.ToString()), r.Cells[1].Text,
                r.Cells[2].Text, Int32.Parse(r.Cells[3].Text), r.Cells[4].Text);
            Session["insumo"] = inBE;
            if (Session["codFrmInsumo"] != null)
            {
                if ((int)Session["codFrmInsumo"] == 1)
                    Server.Transfer("~/frmInsumo.aspx");
                if ((int)Session["codFrmInsumo"] == 2)
                    Server.Transfer("~/frmPedido.aspx");
            }
        }
    }
}